<!--#include file="CheckSession.asp"-->
<!--#include file="../inc/PublicFun.Asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <meta name="<%= WebMetal %>" content="<%= WebTitle %>">
    <title><%= WebTitle %></title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td height="50" align="center" class="title">��Ա����</td>
    </tr>
</table>
<%
IF Request("Action") = "del" Then
	'ɾ��
		conn.execute("delete from Member where MemberId="&trim(request("id"))&"")
		response.Write("<script language='javascript'>window.location.href='Admin_MemberList . asp'</script>")
	End IF
	
	IF Request("Action")="c" Then
		if (request("ischeck")="" or request("ischeck")=0) then
			a=1
		else
			if request("ischeck")=1 then
				a=0
			end if
		end if
		conn.execute("update Member set MemberIsCheck="&a&" where MemberId="&trim(request("id"))&"")
		response.Write("<script language='javascript'>window.location.href='Admin_MemberList . asp'</script>")
	End IF	

%>

<br>
<table width="100%" height="25" border="1" cellpadding="4" cellspacing="0" bordercolordark="#CCCCCC" bordercolorlight="#ffffff"> 
  <tr>
    <td width="9%" height="25" align="center" class="borderon">����</td>
    <td width="21%" align="center" class="borderon">��Ա</td>
    <td width="24%" align="center" class="borderon">����</td>
    <td width="24%" align="center" class="borderon">�绰</td>
	<td width="12%" align="center" class="borderon">��Ա����</td>
    <td width="10%" align="center" class="borderon">ʱ��</td>
  </tr>
<%

	Set Rs=Server.CreateObject("Adodb.RecordSet")
	Sql="Select * from Member Order by times Desc"
	Rs.PageSize = 20  
	Rs.Open sql,conn,1,1 
	  
	TotalNumber=Rs.RecordCount
	MaxPerPage=Rs.PageSize
	if totalnumber>0 then
		if not isempty(request("page")) and request("page")<>"" then 
			CurrentPage=Cint(request("page")) 
		else 
			CurrentPage=1 
		end if
		rs.AbsolutePage=CurrentPage
			
		for i=1 to rs.PageSize	
		if Rs.Eof or rs.Bof then exit for
		
%>
  <tr>
    <td align="center" nowrap><a href="?action=c&id=<%=rs("MemberId")%>&ischeck=<%=rs("MemberIsCheck")%>"><%if rs("MemberIsCheck")=1 then response.Write "�����" else response.Write "<font color=red>δ���</font>" end if%></a>&nbsp;<a href="#" onClick="if (confirm('ȷ��ɾ��')==true){window.location.href=' ? action = del & id =<%=rs("MemberId")%>
'}">ɾ��</a>|<a href="Admin_Memberinfor.asp?MemberId=<%= rs("MemberId") %>&Action=e">��Ϣ</a></td>
<td><%= Rs("MemberName") %>&nbsp;</td>
<td><%= Rs("MemberPwd") %>&nbsp;</td>
<td><%= Rs("MemberTel") %>&nbsp;</td>
<td width="12%" align="center">&nbsp;
    <%
    Set Rs1 = Server . CreateObject("Adodb.RecordSet")
			Sql1 = "Select * from mtype where Id=" & rs("MemberTypeId") & ""
			Rs1 . open Sql1,Conn,1,3
			If not(Rs1 . Eof and Rs1 . Bof) then
				do while not Rs1 . Eof
		%>
    <%= rs1("classname") %>
    <%
    Rs1 . MoveNext
				Loop
			End IF
        Rs1 . Close()
    Set Rs1 = Nothing
		%>    </td>
<td width="10%" align="center" nowrap><%= Rs("Times") %>&nbsp;</td>
</tr>
<%
Rs . MoveNext
		 Next
  %>
<tr>
    <td colspan="6"><% call showpage(totalnumber, maxperpage, CurrentPage, "", "keyword")%></td>
</tr>
<%
Else
%>
    <tr>
        <td colspan="6" height="30" align="center">������Ϣ</td>
    </tr>
<%
End If
Rs.Close()
Set Rs = Nothing

%>
</table>
</body>
</html>
